package com.dsbj.common.model;

import lombok.Data;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * 部门Bean
 *
 * @author evan 2017-09-28
 * @version 1.0
 */
@Data
public class Dept{
	

	private String companyno; // 公司编号
	
	private String id; //GUID主键
	private String parentId; // 上级主键ID
	private String deptno;// 部门编号
	private String deptname; // 部门名称
	private Integer labortype; // 0为DL 一线部门,1为IDL 辅助岗位部门
	private Integer outside; // 0为内部，1为外部
	
	private String firstid;//一级部门
	private Integer updateflag; //同步状态
	private Integer noattendance;//不纳入考勤(1:不纳入 ;0:纳入)
	private Integer nosalary;//不纳入薪资(1:不纳入;0:纳入)
	
	private String firstdeptno; //一级部门编号
	private String firstdeptname; //一级部门名称
	private String seconddeptno; //二级部门编号
	private String seconddeptname; //二级部门名称
	private String thirddeptno; //三级部门编号
	private String thirddeptname; //三级部门名称
	private String fourthdeptno; //四级部门编号
	private String fourthdeptname; //四级部门名称
	private String fifthdeptno; //五级部门编号
	private String fifthdeptname; //五级部门名称
	
	//自定义
	
	private Boolean isChildren;
	
	private String parentName;
	
	private String firstname; //一级部门名称
	
	private String[] notIncosteptno; //成本中心选择部门   已选过的不显示
	
	private String[] deptnos;
	
	private String[] inworkovertimedlimit;
	
	private String[] workovertimedlimit;
	
	private String[] deptnames;
	
	private String[] ids;
	
	private String deptnoDim; //模糊查询
	
	public static final List<String> COLUMN_HEAD = new ArrayList<String>();
	
	public static final Map<Integer, Integer> COLUMN_WIDTH = new LinkedHashMap<Integer, Integer>(12);

	private Integer status; // 状态（0:停用，1:启用）
	private String createTime; // 创建时间
	private String createUser; // 创建人
	private String updateTime; // 修改时间
	private String updateUser; // 修改人
	
	static {
		COLUMN_WIDTH.put(0, (int) ((1000 * 25) / 3.57));
		COLUMN_WIDTH.put(1, (int) ((1000 * 20) / 3.57));
		COLUMN_WIDTH.put(2, (int) ((1000 * 20) / 3.57));
		COLUMN_WIDTH.put(3, (int) ((1000 * 20) / 3.57));
		COLUMN_WIDTH.put(4, (int) ((1000 * 20) / 3.57));
		COLUMN_WIDTH.put(5, (int) ((1000 * 20) / 3.57));
		COLUMN_WIDTH.put(6, (int) ((1000 * 20) / 3.57));
		COLUMN_WIDTH.put(7, (int) ((1000 * 20) / 3.57));
		COLUMN_WIDTH.put(8, (int) ((1000 * 20) / 3.57));
		COLUMN_WIDTH.put(9, (int) ((1000 * 20) / 3.57));
		COLUMN_WIDTH.put(10, (int) ((1000 * 20) / 3.57));
		COLUMN_WIDTH.put(11, (int) ((1000 * 20) / 3.57));
		
		COLUMN_HEAD.add("部门编号");
		COLUMN_HEAD.add("部门名称");
		COLUMN_HEAD.add("一级部门编码");
		COLUMN_HEAD.add("一级部门名称");
		COLUMN_HEAD.add("二级部门编码");
		COLUMN_HEAD.add("二级部门名称");
		COLUMN_HEAD.add("三级部门编码");
		COLUMN_HEAD.add("三级部门名称");
		COLUMN_HEAD.add("四级部门编码");
		COLUMN_HEAD.add("四级部门名称");
		COLUMN_HEAD.add("五级部门编码");
		COLUMN_HEAD.add("五级部门名称");
	}
	
	
	public String gettext() {
		return getDeptno() + "-" + getDeptname();
	}
	
}
